<template>
    <div class="header">
        <h1 class="title">新型冠状肺炎实时监测</h1>
        <span class="sp">当前时间：{{ getTime }}</span>
    </div>
</template>

<script setup>
import { ref, reactive, toRefs, onBeforeMount, onMounted } from 'vue'
import { formatTime } from '@/utils/index.js'
const getTime = ref(null)
setInterval(() => {
    getTime.value = formatTime(
        +new Date(), 'yyyy-MM-dd-HH:mm:ss'
    )

}, 1000);

</script>   
<style scoped>
.header {
    height: 100px;
    background: url("@/assets/image/head_bg.png");
}

.title {
    color: #fff;
    text-align: center;
    line-height: 100px;
    font-weight: 500;
    font-size: 50px;

}

.sp {
    position: fixed;
    top: 0;
    line-height: 100px;
    right: 10px;
    color: rgb(177, 175, 175);
}
</style>